<template>
  <div class="admin-layout">
    <t-menu theme="dark" default-value="dashboard" class="sidebar-menu">
      <template #logo>
        <img height="30" src="@/assets/logo2.png" alt="logo" class="sidebar-logo" />
      </template>
      <t-submenu value="dashboard">
        <template #title>
          <t-icon name="dashboard" />
          首页
        </template>
        <t-menu-item value="home-main">
          <RouterLink to="/admin">首页</RouterLink>
        </t-menu-item>
      </t-submenu>
      <t-submenu value="personal-center">
        <template #title>
          <t-icon name="user-circle" />
          个人中心
        </template>
        <t-menu-item value="personal-main">
          <RouterLink to="/admin/page1">个人中心</RouterLink>
        </t-menu-item>
      </t-submenu>
      <t-submenu value="user-management">
        <template #title>
          <t-icon name="server" />
          用户管理
        </template>
        <t-menu-item value="view-accounts">
          <RouterLink to="/admin/page16">批量用户管理</RouterLink>
        </t-menu-item>
        <t-menu-item value="manage-accounts">
          <RouterLink to="/admin/page2">用户账号管理</RouterLink>
        </t-menu-item>
      </t-submenu>
      <t-submenu value="repair-personnel-management">
        <template #title>
          <t-icon name="root-list" />
          维修员管理
        </template>
        <t-menu-item value="view-repair-personnel">
          <RouterLink to="/admin/page3">批量维修人员管理</RouterLink>
        </t-menu-item>
        <t-menu-item value="manage-repair-personnel">
          <RouterLink to="/admin/page4">管理维修人员信息</RouterLink>
        </t-menu-item>
      </t-submenu>
      <t-submenu value="repair-order-management">
        <template #title>
          <t-icon name="control-platform" />
          报修单管理
        </template>
        <t-menu-item value="view-repair-orders">
          <RouterLink to="/admin/page5">查看报修单列表</RouterLink>
        </t-menu-item>
        <t-menu-item value="review-repair-orders">
          <RouterLink to="/admin/page6">审核报修单</RouterLink>
        </t-menu-item>
      </t-submenu>
      <t-submenu value="maintenance-scheduling">
        <template #title>
          <t-icon name="precise-monitor" />
          维修安排管理
        </template>
        <t-menu-item value="view-maintenance-schedule">
          <RouterLink to="/admin/page7">查看维修安排</RouterLink>
        </t-menu-item>
        <t-menu-item value="assign-maintenance-tasks">
          <RouterLink to="/admin/page8">指派维修任务</RouterLink>
        </t-menu-item>
      </t-submenu>
      <t-submenu value="maintenance-incentive-management">
        <template #title>
          <t-icon name="mail" />
          维修记录管理
        </template>
        <t-menu-item value="view-records">
          <RouterLink to="/admin/page9">查看记录</RouterLink>
        </t-menu-item>
        <t-menu-item value="manage-maintenance-records">
          <RouterLink to="/admin/page10">管理维修记录</RouterLink>
        </t-menu-item>
        <t-menu-item value="manage-maintenance-ai">
          <RouterLink to="/admin/page15">智能服务</RouterLink>
        </t-menu-item>
      </t-submenu>
      <t-submenu value="system-management">
        <template #title>
          <t-icon name="edit-1" />
          物料管理
        </template>
        <t-menu-item value="system-configuration">
          <RouterLink to="/admin/page11">物料仓库</RouterLink>
        </t-menu-item>
        <t-menu-item value="permission-management">
          <RouterLink to="/admin/page12">物料申请</RouterLink>
        </t-menu-item>
      </t-submenu>
      <t-submenu value="service-evaluation-management">
        <template #title>
          <t-icon name="play-circle" />
          服务评价管理
        </template>
        <!--        <t-menu-item value="view-evaluations">-->
        <!--          <RouterLink to="/admin/page13">查看评价</RouterLink>-->
        <!--        </t-menu-item>-->
        <t-menu-item value="handle-evaluations">
          <RouterLink to="/admin/page14">处理评价</RouterLink>
        </t-menu-item>
      </t-submenu>
      <t-menu-item value="login">
        <template #icon>
          <t-icon name="login" />
        </template>
        <RouterLink to="/login">登录页面</RouterLink>
      </t-menu-item>
    </t-menu>
    <div class="content">
      <router-view></router-view>
    </div>
  </div>
</template>

<script setup lang="ts">

</script>

<style scoped>
.admin-layout {
  display: flex;
}
.sidebar-menu {
  width: 200px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  overflow-y: auto;
}
.content {
  margin-left: 200px;
  padding: 20px;
  width: calc(100% - 200px);
}
.sidebar-logo {
  display: block;
  margin: 0 auto;
}
.t-menu-item {
  margin: 15px 0;
}
</style>